package com.org.gsc.zsqdemo2;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by qundui on 2017/6/22.
 */

public class MyAdapter extends FragmentPagerAdapter {
    List<Fragment> mFragments;


    public MyAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        mFragments = fragments;

    }


    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments.size()==0?0:mFragments.size();
    }


}
